package com.aidex.biz.service;

import com.aidex.biz.domain.PushRule;
import com.aidex.common.core.service.BaseService;
import com.aidex.biz.domain.PushRuleUser;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 规则用户对应Service接口
 *
 * @author sean
 * @email 2074844820@qq.com
 * @date 2025-03-11
 */
public interface PushRuleUserService extends BaseService<PushRuleUser> {

    /**
     * 批量删除规则用户对应
     *
     * @param ids 需要删除的规则用户对应ID集合
     * @return 结果
     */
    public int deletePushRuleUserByIds(String[] ids);

    /**
     * 获取最大编号
     *
     * @param pushRuleUser 规则用户对应
     * @return 结果
     */
    public int findMaxSort(PushRuleUser pushRuleUser);

    /**
     * 根据用户id查询分配用户
     *
     * @param userIds
     * @return
     */
    public List<PushRuleUser> getListByUserIds(String[] userIds);

    /**
     * 查询用户外链分配用户
     *
     * @param pushRuleUser
     * @return
     */
    public List<PushRuleUser> findUserJoinRuleList(PushRuleUser pushRuleUser);

    /**
     * 根据主表id批量删除规则用户
     *
     * @param ids 需要删除的主表对应ID集合
     * @return 结果
     */
    @Transactional(readOnly = false)
    public int deletePushRuleUserByRuleIds(String[] ids);

    public List<PushRuleUser> findShareUserByRule(PushRule pushRule);

    public List<PushRuleUser> findQyjlInRuleUser(PushRuleUser pushRuleUser);

    @Transactional(readOnly = false)
    public int resetDayShareCount();

    @Transactional(readOnly = false)
    public int changeWorkingPushRuleUser(PushRuleUser pushRuleUser);

    public List<PushRuleUser> findAllShareUserByRule(PushRule pushRule);

    public List<PushRuleUser> findQyjlByCity(String city);

    public List<PushRuleUser> findPushUserListByRuleIds(List<PushRule> pushRules);

    @Transactional(readOnly = false)
    public int resetRuleUserTotalCount();
}
